import {Request, Response} from 'express'
import Log4js from '../../../core/log/Log4jsConfig'

import {Controller} from "../../../core/decorator/Controller";
import {RequestMapping, RequetMethod} from "../../../core/decorator/RequestMapping";
import {R} from "../../../core/domain/R";
import {BaseController} from "../../../core/base/BaseController";
import {sysMenuService} from '../service/SysMenuService'

const logger = Log4js.getLogger('SysMenuController')

@Controller("/sys/menu")
export class SysMenuController extends BaseController {

    @RequestMapping("/list", RequetMethod.GET)
    async list(req: Request, res: Response) {
        logger.info('list')
        const sysmenu = await sysMenuService.findById(1)
        logger.info(sysmenu)
        res.json(R.ok())
    }
}
